1. Field of the Invention
This invention relates to direct memory access apparatus and, more particularly, to improved apparatus for rapidly transferring information from an input device to a rectangular region of memory or from a rectangular region of memory to an output device.
2. History of the Prior Art
A typical direct memory access (DMA) controller moves information between an external peripheral device and main memory. Such a device is customarily used to relieve the central processing unit of the duty to transfer large blocks of information between peripheral devices and main memory. It may also be used for transferring information to other memory positions such as a frame buffer. In modern computers adapted to handle information from many different sources, it is often desirable to transfer information from an external device such as a source of television signals so that the information may be displayed in a window on an output display device. It is desirable that a DMA controller be used to accomplish this transfer.
When transferring data from an input device to memory, a DMA controller will receive a sequence of data from the input device. It will place the data into memory at a specified destination address. It will increment the destination address after each word has been transferred thereby placing the data into a contiguous block of memory. When transferring data from memory to an output device, a DMA controller will read data from a specified source address in memory. It will place the data in the output device at the specified destination. It will increment the source address after each word has been transferred thereby transferring a contiguous block from memory to the output device.
In contrast to main memory or other typical random access memory, a frame buffer also provides serial pixel output on a line by line basis for transfer to an output display so that a consistent graphical picture may be displayed. When a process or program provides information which is to be displayed on a graphical display in a rectangular portion (a window) which is less than the entire picture, the pixels defining the window are stored in the frame buffer so that the window is scanned out line-by-line as the frame buffer data is scanned to the display. However, the position of the window on the display may be anywhere within the overall screen display. Typically, the window will be a rectangle which is to be positioned at some X-Y starting position other than the upper left hand corner of the display and will take up a certain width and height on the display. The addresses for the pixels defining the window within the frame buffer are not usually a block of contiguous addresses in the frame buffer.
In general, frame buffer memory is made up of a set of linearly arranged addresses. These addresses are divided into groups each of which defines one horizontal line on the display. The information in a rectangular window (hereinafter referred to as a rectangular portion of memory), is thus made up of a number of clusters including a number of sequential pixels appearing in the same position within a number of sequential groups defining lines on the display. Since the rectangular window may appear anywhere on the display, each set of sequential pixels forming a line in a window is separated in the frame buffer from the next set of sequential pixels forming the next line in the window by pixels not within the window. These are at least the pixels in each line of the display leading up to the edge of the window, both to the left and to the right. It is for this reason that the pixels forming the lines within a rectangular window or other rectangular portion of memory are not in one contiguous block.
Since a DMA controller places the first piece of information at the first destination address, increments the address by one, places the next piece of information at that address, and continues incrementing in order addresses within the memory device, a DMA controller is able only to address a block of sequential addresses. Since a DMA controller is unable to skip over the space in the memory to which information is not to be written, a DMA controller is not used where the information is being placed in a window of a frame buffer or other rectangular portion of other memory. For example, were one to attempt such a use for filling a window in a frame buffer less than the full width of the display, the processor controlling the transfer would have to intervene and provide a new starting address for each scan line of the window to be presented on the output display. This requires a significant amount of time to be spent by the processor, time essentially wasted in so far as actually transferring any information.